/* 拖拽操作反馈组件样式 */
.feedbackContainer {
  position: fixed;
  z-index: 2000;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  pointer-events: none;
}

/* 位置变体 */
.feedbackContainer.top-right {
  top: 20px;
  right: 20px;
}

.feedbackContainer.top-left {
  top: 20px;
  left: 20px;
}

.feedbackContainer.bottom-right {
  bottom: 20px;
  right: 20px;
}

.feedbackContainer.bottom-left {
  bottom: 20px;
  left: 20px;
}

.feedbackContainer.center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 500px;
}

/* 反馈卡片 */
.feedback {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
  pointer-events: auto;
  animation: feedbackSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid;
  max-width: 100%;
}

/* 反馈类型样式 */
.feedback.success {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.feedback.error {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.feedback.warning {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

.feedback.info {
  border-left-color: #17a2b8;
  background: linear-gradient(135deg, #f0fdff 0%, #ffffff 100%);
}

/* 动画 */
@keyframes feedbackSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.feedback.animatingOut {
  animation: feedbackSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes feedbackSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 200px;
    margin-bottom: 12px;
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
    max-height: 0;
    margin-bottom: 0;
  }
}

/* 头部 */
.feedbackHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.feedbackIcon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.feedbackTitle {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  flex: 1;
  line-height: 1.3;
}

.closeButton {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 20px;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
  flex-shrink: 0;
}

.closeButton:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #495057;
}

/* 内容 */
.feedbackContent {
  padding: 0 20px 16px;
}

.feedbackMessage {
  font-size: 14px;
  color: #495057;
  line-height: 1.4;
  margin-bottom: 8px;
}

.feedbackDetails {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  border-left: 3px solid rgba(0, 0, 0, 0.1);
}

/* 房间信息 */
.roomsContainer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.sourceRoom,
.targetRoom {
  flex: 1;
}

.roomLabel {
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.roomInfo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roomNumber {
  font-size: 14px;
  font-weight: 700;
  color: #212529;
}

.roomType {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

.date {
  font-size: 11px;
  color: #868e96;
  font-family: 'Courier New', monospace;
}

.arrow {
  font-size: 16px;
  color: #28a745;
  font-weight: bold;
  flex-shrink: 0;
}

/* 状态信息 */
.statusContainer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
}

.statusContainer .statusLabel {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
}

.statusInfo {
  display: flex;
  align-items: center;
  gap: 6px;
}

.statusIcon {
  font-size: 14px;
  line-height: 1;
}

.statusInfo .statusLabel {
  font-size: 13px;
  font-weight: 500;
  color: #495057;
}

/* 操作按钮 */
.feedbackActions {
  display: flex;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  justify-content: flex-end;
}

.actionButton {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
}

.actionButton.primary {
  background: #007bff;
  color: white;
}

.actionButton.primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.actionButton.secondary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.actionButton.secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* 进度条 */
.progressContainer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.progressBar {
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
  width: 100%;
  animation: progressShrink linear;
  transform-origin: right;
}

@keyframes progressShrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* 成功类型的进度条 */
.feedback.success .progressBar {
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

/* 错误类型的进度条 */
.feedback.error .progressBar {
  background: linear-gradient(90deg, #dc3545 0%, #fd7e14 100%);
}

/* 警告类型的进度条 */
.feedback.warning .progressBar {
  background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

/* 信息类型的进度条 */
.feedback.info .progressBar {
  background: linear-gradient(90deg, #17a2b8 0%, #6610f2 100%);
}

/* 更多指示器 */
.moreIndicator {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .feedbackContainer {
    max-width: calc(100vw - 32px);
    margin: 0 16px;
  }

  .feedbackContainer.top-right,
  .feedbackContainer.top-left {
    top: 16px;
    left: 16px;
    right: 16px;
  }

  .feedbackContainer.bottom-right,
  .feedbackContainer.bottom-left {
    bottom: 16px;
    left: 16px;
    right: 16px;
  }

  .feedbackContainer.center {
    top: 20%;
    left: 16px;
    right: 16px;
    transform: none;
    max-width: none;
  }

  .feedbackHeader {
    padding: 12px 16px 8px;
  }

  .feedbackContent {
    padding: 0 16px 12px;
  }

  .feedbackActions {
    padding: 8px 16px 12px;
    flex-direction: column;
  }

  .actionButton {
    width: 100%;
    margin: 2px 0;
  }

  .roomsContainer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .arrow {
    transform: rotate(90deg);
    align-self: center;
  }
}

@media (max-width: 480px) {
  .feedbackTitle {
    font-size: 14px;
  }

  .feedbackMessage {
    font-size: 13px;
  }

  .roomNumber {
    font-size: 13px;
  }

  .roomType {
    font-size: 11px;
  }
}

/* 滚动条样式 */
.feedbackContainer::-webkit-scrollbar {
  width: 4px;
}

.feedbackContainer::-webkit-scrollbar-track {
  background: transparent;
}

.feedbackContainer::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.feedbackContainer::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .feedback {
    background: #2d3748;
    color: #e2e8f0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }

  .feedbackTitle {
    color: #e2e8f0;
  }

  .feedbackMessage {
    color: #cbd5e0;
  }

  .feedbackDetails {
    background: rgba(255, 255, 255, 0.05);
    color: #a0aec0;
  }

  .closeButton {
    color: #a0aec0;
  }

  .closeButton:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
  }

  .roomsContainer,
  .statusContainer {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .actionButton.secondary {
    background: #4a5568;
    color: #e2e8f0;
    border-color: #2d3748;
  }

  .actionButton.secondary:hover {
    background: #2d3748;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .feedback {
    border-width: 2px;
    border-left-width: 6px;
  }

  .feedbackTitle,
  .feedbackMessage {
    font-weight: 700;
  }

  .actionButton {
    border-width: 2px;
    font-weight: 700;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  .feedback,
  .progressBar,
  .moreIndicator {
    animation: none;
  }

  .actionButton,
  .closeButton {
    transition: none;
  }
}
